In the past, in an internal combustion engine, it was known to provide an exhaust passage with an exhaust purification catalyst able to remove harmful substances in exhaust gas. However, the exhaust purification catalyst sometimes deteriorates along with time due to poisoning, heat degradation, etc. If the exhaust purification catalyst deteriorates, the exhaust purification catalyst falls in purification efficiency. For this reason, it is desirable to be able to quickly detect if the exhaust purification catalyst has deteriorated and the exhaust purification catalyst is abnormal. Therefore, in the internal combustion engine described in PLT 1, a downstream side sensor detecting the air-fuel ratio of the exhaust gas flowing out from the exhaust purification catalyst is used to calculate the maximum oxygen storage amount of the exhaust purification catalyst and thereby diagnose the exhaust purification catalyst for abnormality.
In this internal combustion engine, the air-fuel ratio at the upstream side of the catalyst is alternately switched between an air-fuel ratio richer than the stoichiometric air-fuel ratio and an air-fuel ratio leaner than the stoichiometric air-fuel ratio. Each time the air-fuel ratio is switched, the maximum oxygen storage amount of the catalyst is calculated. Specifically, the amount of oxygen stored in the exhaust purification catalyst or released from the exhaust purification catalyst in the time period when the derivative or second derivative of the output of the downstream side sensor is within a predetermined range is calculated and the calculated amount of oxygen is made the estimated value of the maximum oxygen storage amount. If the calculated maximum oxygen storage amount is a predetermined value or less, it is judged that the exhaust purification catalyst is abnormal.